﻿using System;

namespace Sharp.Portal.Other
{
    /// <summary>
    /// 列特性
    /// </summary>
    [Flags]
    public enum ColumnFeature
    {
        /// <summary>
        /// 无特性
        /// </summary>
        None = 0,

        /// <summary>
        /// 禁止排序
        /// </summary>
        SortDisable = 1,

        /// <summary>
        /// 多列排序，只有模块打开多列排序时才可以见
        /// </summary>
        MultiSortable = 2,

        /// <summary>
        /// 可分组
        /// </summary>
        Groupable = 4,

        ///////////////////////// 格式化特性
        /// <summary>
        /// 变化量，可用于显示增长率等，分颜色体现变化值
        /// </summary>
        Change = 8,

        /// <summary>
        /// 百分比变化量，自动加入%，可用于显示增长率等，分颜色体现变化值
        /// </summary>
        PercentageChange = 16,

        /// <summary>
        /// 格式化零时间为空
        /// </summary>
        FormatZeroDateTime = 32,

        ///////////////////////// 聚合特性
        /// <summary>
        /// 平均值
        /// </summary>
        Average = 128,

        /// <summary>
        /// 求和
        /// </summary>
        Sum = 256,

        /// <summary>
        /// 最大值
        /// </summary>
        Maximum = 512,

        /// <summary>
        /// 最小值
        /// </summary>
        Minimum = 1024,

        /// <summary>
        /// 冻结列
        /// </summary>
        Locked = 2048,

        ///////////////////////// 列类型
        /// <summary>
        /// 数字列
        /// </summary>
        NumberColumn = 4096,

        /// <summary>
        /// 日期列
        /// </summary>
        DateColumn = 8192,

        /// <summary>
        /// 布尔列
        /// </summary>
        BooleanColumn = 16384,

        /// <summary>
        /// 模板列
        /// </summary>
        TemplateColumn = 32768,

        /// <summary>
        /// 树列
        /// </summary>
        TreeColumn = 65536
    }
}